package com.zhong.dagger2.mvp.activity;

import android.os.Bundle;
import android.widget.TextView;

import com.zhong.dagger2.R;
import com.zhong.dagger2.app.App;
import com.zhong.dagger2.base.BaseActivity;
import com.zhong.dagger2.di.component.DaggerCommonComponent;
import com.zhong.dagger2.mvp.TestModule;
import com.zhong.dagger2.mvp.contact.TestContact;
import com.zhong.dagger2.mvp.presenter.TestPresenter;

/*
 * 项目名:    Dagger2Test
 * 包名       com.zhong.dagger2.mvp.activity
 * 文件名:    TestActivity
 * 创建者:    ZJB
 * 创建时间:  2017/10/23 on 21:46
 * 描述:     TODO
 */
public class TestActivity extends BaseActivity<TestPresenter> implements TestContact.view {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TextView textView = (TextView) findViewById(R.id.textview);
    }

    @Override
    public void initPresenter() {
        DaggerCommonComponent.builder().appComponent(App.getAppComponent())
                .testModule(new TestModule(this))
                .build().inject(this);
    }
}